package cn.edu.dlut.port.isp.repostitory.teach;

import java.util.List;

import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.query.Param;
import org.springframework.transaction.annotation.Transactional;

import cn.edu.dlut.port.isp.bean.teach.simulation.ResultBean2;

public interface ResultRepository2  extends CrudRepository<ResultBean2, Long>{
	List<ResultBean2> findBySnoAndSname(String sno,String sanme);
	
	@Transactional
	@Modifying
	@Query(value="delete ResultBean2 rb WHERE rb.sno= :sno and rb.sname=:sname")
	int deleteAllBySnoAndSname(@Param("sno")String sno,@Param("sname")String sname);
	
/*	@Query(value="select rb from ResultBean rb WHERE rb.sno= :sno and rb.sname=:sname")
	List<ResultBean> selectAllBySnoAndSname(@Param("sno")String sno,@Param("sname")String sname);*/
}
